In recent years, there have been an increasing number of electronic products with ports for connecting each other. The electronic products include but not limited to computer accessories (e.g. keyboards, pointing devices, printers, disk drives, flash drive and network adapters), portable devices (e.g. smartphones, Personal Digital Assistance (PDA)), portable media players, digital cameras, various sensing devices such as blood-pressure or heart-beat monitors, pure power supply units (e.g. portable chargers), personal computers. One way to allow routing power and exchanging data among the electronic products is to connect the electronic products to a hub. However, in order to successfully route power and exchange data among the electronic products through the hub, the electronic product acting as a master has to be plugged into a specific port of the hub.